package com.hyh.generator.controller;


import com.hyh.ad.common.core.domain.AjaxResult;
import com.hyh.generator.config.Generator;
import com.hyh.generator.domain.TableInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RequestMapping("/api/generator")
@RestController
@Api(tags = "代码生成")
public class GeneratorController {

    @GetMapping("/genCode")
    @ApiOperation(value = "生成代码  默认路径当前项目下generatorCode文件夹")
    public AjaxResult genCode(TableInfo tableInfo) {
        Generator generator = new Generator();
        return  generator.generator(tableInfo);
    }
}
